//
//  VideoRender.h
//  TestOpenGL
//
//  Created by huangzan on 12-10-30.
//  Copyright (c) 2012年 huangzan. All rights reserved.
//
#import <UIKit/UIKit.h>

#import <Foundation/Foundation.h>
#import "AncdaPlayer.h"

#import "AncdaSession.h"
typedef enum {
    
    SURFACE_FILL,
    SURFACE_BEST_FIT,
    SURFACE_ORIGINAL,
    SURFACE_4_3,
} VideoFillModeType;


typedef enum { kNoRotation, kRotateLeft, kRotateRight, kFlipVertical, kFlipHorizonal, kRotateRightFlipVertical, kRotate180 } RotationMode;


@protocol AncdaPlayerDelegate <NSObject>

-(void) OnAncdaPlayerState:(StreamState)state lparam:(long)lparam wparam:(long)wparam;
-(void) mouseDown;

@end



@interface AncdaPlayer : UIView
{
    RotationMode inputRotation;
}

@property(readwrite, nonatomic) VideoFillModeType fillMode;
@property(readonly, nonatomic) CGSize sizeInPixels;
@property (nonatomic,strong) AncdaSession * ancdaSession;

@property(readonly, nonatomic) BOOL hasAudio;
@property(nonatomic)BOOL EnableAudio;
@property(readonly, nonatomic) BOOL isTalk;
@property(readonly, nonatomic) BOOL isPlay;
@property(nonatomic) BOOL EnableAlarm;
@property(nonatomic,strong) id<AncdaPlayerDelegate> delegate;
@property(nonatomic) int Bandwidth;

-(void) clean;
-(void)setFillMode:(VideoFillModeType)newValue;
-(BOOL)play:(NSString*)key;
-(void)stop;
-(BOOL)startTalk;
-(void)stopTalk;
-(BOOL)saveScreenshot;
-(void)ptzCommand:(int)code param:(int)param;
@end
